package com.coding.kan_yi_dao.controller;


import com.coding.kan_yi_dao.common.Result;
import com.coding.kan_yi_dao.entity.GoodsCategory;
import com.coding.kan_yi_dao.entity.GoodsInfo;
import com.coding.kan_yi_dao.entity.GoodsLike;
import com.coding.kan_yi_dao.service.impl.GoodsCategoryServiceImpl;
import com.coding.kan_yi_dao.service.impl.GoodsInfoServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 砍一刀，不买就砍你一刀
 * @since 2023-09-20
 */
@Api(tags = "分类管理")
@RestController
@RequestMapping("/goods-category")
@CrossOrigin
public class GoodsCategoryController {

    @Resource
    GoodsCategoryServiceImpl goodsCategoryService;

    @ApiOperation(value = "全查询")
    @GetMapping("/go_select/goodscategory")
    public Result go_select( ){
        return goodsCategoryService.go_select();
    }

    @ApiOperation(value = "修改")
    @GetMapping("/go_update/goodscategory")
    public Result go_update(GoodsCategory goodsCategory){
        return goodsCategoryService.go_update(goodsCategory);
    }

    @ApiOperation(value = "删除")
    @GetMapping("/go_delete/goodscategory")
    public Result go_delete(GoodsCategory goodsCategory){
        return goodsCategoryService.go_delete(goodsCategory);
    }

    @ApiOperation(value = "添加")
    @GetMapping("/go_insert/goodscategory")
    public Result go_insert(GoodsCategory goodsCategory){
    return goodsCategoryService.go_insert(goodsCategory);
    }
}
